

const input = document.getElementById('input');
const container = document.getElementById('container');

input.addEventListener('change', (e) => {
  console.log(input.checked, e)
  if (input.checked) {
    container.className = 'container moon';
  } else {
    container.className = 'container sun';
  }
});